package com.biz.primus.model.price.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.apache.commons.lang3.StringUtils;

import java.io.Serializable;

@Data
@ApiModel("同步价格vo")
public class SyncPriceVo implements Serializable {

    @ApiModelProperty("门店编码")
    private String depotCode;

    @ApiModelProperty("商品编码")
    private String productCode;

    @ApiModelProperty("商品状态 0-待启用 1-新品试销 2-新品评估 3-正常 4-暂停订货 5-换季处理 6-暂停经营 7-停止销售 8-待清退 9-清退")
    private Integer goodsStatus;

    @ApiModelProperty("零售执行价")
    private Integer retailPrice;

    @ApiModelProperty("零售正常价")
    private Integer retailNormalPrice;

    @ApiModelProperty("会员执行价")
    private Integer finalPrice;

    @ApiModelProperty("会员正常价")
    private Integer normalPrice;

    @ApiModelProperty("批发执行价")
    private Integer tradePrice;

    @ApiModelProperty("批发正常价")
    private Integer tradeNormalPrice;

    @ApiModelProperty("电子钱包价")
    private Integer eWalletPrice;

    @ApiModelProperty("整箱单瓶价")
    private Integer fclSinglePrice;

    public Boolean valid() {
        if (finalPrice != null && finalPrice > 0 &&
                normalPrice != null && normalPrice > 0 &&
                eWalletPrice != null && eWalletPrice > 0 &&
                fclSinglePrice != null && fclSinglePrice > 0 &&
                StringUtils.isNotBlank(this.depotCode) &&
                StringUtils.isNotBlank(this.productCode)) {
            return Boolean.TRUE;
        } else {
            return Boolean.FALSE;
        }
    }

}
